//
// Created by user on 2022/2/14.
//
#include <iostream>
#include <vector>
using namespace std;
int getSecondMax(vector<int> &nums);

int getSecondMax(vector<int> &nums){
    int first = INT_MIN;
    int second = INT_MIN;

    for (int num:nums){
        if(num>first){
            second = first;
            first = num;
        }else if(num>second){
            second = num;
        }
    }
    return second;
}
